
return function(pokers)
    local t = {};
    t[1] = {};
    t[2] = {};
    local A_count = 0;
    for _, poker in pairs(pokers) do
        if poker.data.client_type ~= -1 then
            local client_value = poker.data.client_value
            if client_value > 10 then
                client_value = 10;
            end

            if client_value == 1 and A_count == 0 then
                A_count = A_count + 1;
                table.insert(t[1], 1);
                table.insert(t[2], 11);
            else
                table.insert(t[1], client_value);
                table.insert(t[2], client_value);
            end
        end
    end
    
    local v1 = 0;
    for _, value in ipairs(t[1]) do
        v1 = v1 + value;
    end

    local v2 = 0;
    for _, value in ipairs(t[2]) do
        v2 = v2 + value;
    end

    if v2 > 21 or v1 == v2 then
        table.remove(t);
        return t;
    end

    if v2 == 21 and #t[2] == 2 then
        table.remove(t, 1);
        return t;
    end

    return t;
end